package com.ft.oa.service.development;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ft.oa.domain.customer.Customer;
import com.ft.oa.domain.development.DevNeed;
import com.ft.oa.domain.development.DevNeedInfo;
import com.ft.oa.domain.development.DevNeedIssue;
import com.ft.oa.domain.dto.ApiResult;
import com.ft.oa.domain.dto.development.ProjectCondition;
import com.ft.oa.domain.dto.development.ProjectDto;
import com.ft.oa.domain.project.ExecProject;
import com.ft.oa.domain.project.ExecProjectStage;
import com.ft.oa.domain.sys.SysUser;

import java.util.List;

/**
 * 需求池接口
 */
public interface DevNeedService {


    /**
     * 删除需求
     * @param id
     */
    void del(Long id);

    /**
     * 需求分页
     * @param devNeed
     * @return
     */
    Page<DevNeed> page(DevNeed devNeed);

    /**
     * 需求类别
     * @param type
     * @return
     */
    List category(String type);


    /**
     * 新增需求
     * @param devNeed
     * @return
     */
    ApiResult add(DevNeed devNeed);

    /**
     * 获取客户列表
     * @param devNeed
     * @return
     */
    List<Customer> customerList(DevNeed devNeed);

    /**
     * 获取项目列表
     * @param devNeed
     * @return
     */
    List<ExecProject> projectList(DevNeed devNeed);

    /**
     * 编辑需求
     * @param devNeed
     */
    ApiResult edit(DevNeed devNeed);

    /**
     * 售前负责人列表
     * @param devNeed
     * @return
     */
    List<SysUser> preSaleList(DevNeed devNeed);

    /**
     * 需求确认
     * @param devNeed
     */
    ApiResult confirm(DevNeed devNeed);

    /**
     * 拒绝需求
     * @param devNeed
     */
    void reject(DevNeed devNeed);

    /**
     * 关闭需求
     * @param devNeed
     */
    void close(DevNeed devNeed);


    /**
     * 需求下发
     * @param devNeed
     */
    ApiResult issue(DevNeed devNeed);

    /**
     * 需求下发-条件分页
     * @param devNeed
     * @return
     */
    Page<DevNeed> issuePage(DevNeed devNeed);

    /**
     * 创建研发需求
     * @param infos
     */
    void createDevNeed(List<DevNeedInfo> infos);
    /**
     * 立项项目分页
     */
    Page<ExecProject> projectPage(ProjectCondition condition);


    /**
     * 立项项目详情
     * @param projectNumber
     * @return
     */
    List<ExecProjectStage> projectView(String projectNumber);

    /**
     * 项目创建需求
     */
    ApiResult projectToNeed(DevNeed devNeed);

    /**
     * 项目信息
     * @param project
     */
    ProjectDto projectInfo(ExecProject project);

    /**
     * 需求下发回滚
     * @param issue
     * @return
     */
    ApiResult issueRollback(DevNeedIssue issue);
    /**
     * 已下发需求-条件分页
     */
    Page<DevNeedIssue> issuedPage(DevNeed condition);

    DevNeed devNeedDetail(DevNeed devNeed);

    List<DevNeed>  devNeedProjectDetail(ExecProject execProject);

    ApiResult issueEdit(DevNeedIssue devNeedIssue);

    String needNo(DevNeed devNeed);
}
